<!DOCTYPE html>
<html ng-app="demoapp">
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="../bower_components/angular/angular.min.js"></script>
    <script src="../bower_components/angular-route/angular-route.min.js"></script>
    <script src="../bower_components/leaflet/dist/leaflet.js"></script>
    <script src="../dist/angular-leaflet-directive.min.js"></script>
    <link rel="stylesheet" href="../bower_components/leaflet/dist/leaflet.css" />
    <script>
        var app = angular.module("demoapp", ["leaflet-directive"]);
        app.controller("BasicBoundsController", [ "$scope", "leafletData", "leafletBoundsHelpers", function($scope, leafletData, leafletBoundsHelpers) {

            var bounds = leafletBoundsHelpers.createBoundsFromArray([
                [ 51.508742458803326, -0.087890625 ],
                [ 51.508742458803326, -0.087890625 ]
            ]);

            angular.extend($scope, {
                bounds: bounds,
                center: {}
            });

        }]);
    </script>
  </head>
  <body ng-controller="BasicBoundsController">
    <leaflet bounds="bounds" lf-center="center" width="100%" height="480px"></leaflet>
    <h1>Map bounds example</h1>
    <h2>South west</h2>
    <form>
        Lat : <input type="number" step="any" ng-model="bounds.southWest.lat" />
        Lng : <input type="number" step="any" ng-model="bounds.southWest.lng" />
    </form>

    <h2>North east</h2>
    <form>
        Lat : <input type="number" step="any" ng-model="bounds.northEast.lat" />
        Lng : <input type="number" step="any" ng-model="bounds.northEast.lng" />
    </form>
  </body>
</html>
